#ifndef INCLUDED_ENEMYPOOL_H
#define INCLUDED_ENEMYPOOL_H

#include <SGE.h>
using namespace SGE;

#include "MeleeEnemy.h"
#include "ProjectileEnemy.h"

class EnemyPool
{
	public:
		EnemyPool();
		~EnemyPool();

		void Load(int level);
		void Unload();
		void Update(float deltaTime, Map& map, Character& character);
		void Render(const SVector2& viewOffset);

		ProjectileEnemy* GetProjectileEnemy(int index)		{ return &mProjectileEnemies[index]; }
		MeleeEnemy* GetMeleeEnemy(int index)	{ return &mMeleeEnemies[index]; }
		int GetMaxEnemies() const		{ return kMaxEnemies; }

	private:
		int kMaxEnemies;
		ProjectileEnemy mProjectileEnemies[100];
		int mProjectileEnemyIndex;

		MeleeEnemy mMeleeEnemies[100];
		int mMeleeEnemyIndex;

		float mEnemySpawnDelay;

		void SpawnEnemies(float deltaTime);
		void SpawnLevel1Enemies();
		void SpawnLevel2Enemies();
};
#endif //INCLUDED_ENEMYPOOL_H